package io.transaction.msg.order.controller;

import io.transaction.msg.order.sevice.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
public class OrderController {

    @Autowired
    private OrderService orderService;

    @GetMapping(value = "/submit_order")
    public String transfer(@RequestParam("productId") Long productId, @RequestParam("payCount") Integer payCount){
        orderService.submitOrder(productId, payCount);
        return "下单成功";
    }

}

